Skip to content

Conversation

@yotamofek
Copy link
Contributor

A small cleanup opportunity I found while working on something else.

BTW

the same file also has these two lines, twice:

let rem = self.v.len() % self.chunk_size;
let end = if rem == 0 { self.chunk_size } else { rem };

They can similarly be "simplified" to:

let end = self.v.len().min(self.chunk_size);

but I'm not convinced the majority of people will consider the one-liner is easier to read, so would love to hear opinions about that.

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 27, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 27, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@hkBst
Copy link
Member

hkBst commented Nov 28, 2025

This is already part of #146436 I think.

@yotamofek
Copy link
Contributor Author

Yep!

@yotamofek yotamofek closed this Nov 28, 2025
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants